Class CloudSerialPortImpl

All Implemented Interfaces:
IPCObject, CloudSerialPort, Port, Process

public class CloudSerialPortImpl extends PortImpl implements CloudSerialPort
Information provided by the PKI file:

    \class CloudSerialPort
    
    \brief CloudSerialPort is the serial port on a Cloud device.
    
    \example network().getDevice("Router0").getPort("Serial0")
    
Author:
Auto-generated
  • Constructor Details

  • Method Details

    • setLmiType

      public void setLmiType(LMIType lmiType)
      Information provided by the PKI file:
      
          \brief Sets the LMI type for this port.
          
          \param lmiType, the LMI type to set for this port.
          LMI types:  eLmiAnsi = 0,
          eLmiCisco = 1,
          eLmiQ933a = 2
          
              
      Specified by:
      setLmiType in interface CloudSerialPort
      Parameters:
      lmiType - Takes in a parameter of lmiType
    • getLmiType

      public LMIType getLmiType()
      Information provided by the PKI file:
      
          \brief Returns the LMI type for this port.
          
          \return LmiType, the LMI type for this port.
          LMI types:  eLmiAnsi = 0,
          eLmiCisco = 1,
          eLmiQ933a = 2
          
              
      Specified by:
      getLmiType in interface CloudSerialPort
      Returns:
      LMIType Returns a LMIType
    • addSubLink

      public boolean addSubLink(String name, int dlci)
      Information provided by the PKI file:
      
          \brief Adds a sublink with the specified name and DLCI number to this port.
          
          \param name, the name for this sublink.
          \param dlci, the DLCI number for this sublink.
          
          \return bool, true if successful, otherwise false.
          
              
      Specified by:
      addSubLink in interface CloudSerialPort
      Parameters:
      name - Takes in a parameter of name
      dlci - Takes in a parameter of dlci
      Returns:
      boolean Returns a boolean
    • removeSubLink

      public boolean removeSubLink(String link)
      Information provided by the PKI file:
      
          \brief Removes the sublink with the specified name from this port.
          
          \param link, the name of the sublink of interest.
          
          \return bool, true if successful, otherwise false.
          
              
      Specified by:
      removeSubLink in interface CloudSerialPort
      Parameters:
      link - Takes in a parameter of link
      Returns:
      boolean Returns a boolean
    • getSubLinkCount

      public int getSubLinkCount()
      Information provided by the PKI file:
      
          \brief Returns the number of sublinks on this port.
          
          \return int, the number of sublinks on this port.
          
              
      Specified by:
      getSubLinkCount in interface CloudSerialPort
      Returns:
      int Returns a int
    • getSubLinkAt

      public CloudSubLink getSubLinkAt(int index)
      Information provided by the PKI file:
      
          \brief Returns the sublink at the specified index.
          
          \param index, the index of interest.
          
          \return CloudSubLink, the CloudSubLink object at the specified index.
          
              
      Specified by:
      getSubLinkAt in interface CloudSerialPort
      Parameters:
      index - Takes in a parameter of index
      Returns:
      CloudSubLink Returns a CloudSubLink
    • getSubLinksInfo

      public List<String> getSubLinksInfo()
      Information provided by the PKI file:
      
          \brief Get Sublink info in string format (dlci number and sublink name
          
          \return vector<string>, a vector of sublink info in string format
          
              
      Specified by:
      getSubLinksInfo in interface CloudSerialPort
      Returns:
      List<String> Returns a List<String>
    • getSubLinkByDlci

      public CloudSubLink getSubLinkByDlci(int dlci)
      Information provided by the PKI file:
      
          \brief Returns the sublink associated with a provided dlci
          
          \param dlci, the dlci number.
          
          \return CloudSubLink, the CloudSubLink object associated with the given dlci number
          
              
      Specified by:
      getSubLinkByDlci in interface CloudSerialPort
      Parameters:
      dlci - Takes in a parameter of dlci
      Returns:
      CloudSubLink Returns a CloudSubLink